﻿using IGL_Talk_Win8.Utils;
using System;
using Windows.UI.Popups;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;

// The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236

namespace IGL_Talk_Win8.Controls
{
    public sealed partial class StatusControl : UserControl
    {
        public StatusControl()
        {
            this.InitializeComponent();

            loginForm.Flyout = flyoutLogin;

            txtUser.DataContext = ChatConnection.Instance;
            cmdLogIn.DataContext = ChatConnection.Instance;
            cmdLogOut.DataContext = ChatConnection.Instance;
        }

        private void cmdLogOut_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
        {
            ChatConnection.Instance.Close();
        }
    }
}